<!-- 日能源看板 -->
<template>
  <div class='zhaoxiongfei'>
    <ecsankey height='600px' width='100%' style='' :ecdata='[]'></ecsankey>
    <ecBarNew height='400px' width='100%' :ecdata='ecdata'></ecBarNew>
    <el-radio-group v-model="date_radio" size="mini">
      <el-radio-button label="1">昨日{{Yesterday}}</el-radio-button>
      <el-radio-button label="2">今日{{Today}}</el-radio-button>
      <el-radio-button label="3">近一个月{{Amonth+'-'+Yesterday}}</el-radio-button>
    </el-radio-group>
    <echartsLiquidfill width='200px' height='200px' :ecdata='19'></echartsLiquidfill>
    <ecgauge width='200px' height='200px' :ecdata='[]'></ecgauge>
    <el-button  @click="toggle">放大</el-button>
    <fullscreen ref="fullscreen">
      <ectree width='100%' height='100%'  :ecdata='tree_data' style='min-height:500px'></ectree>
    </fullscreen>

  </div>
</template>

<script>
import ectree from '@/components/echarts/ec_tree'
import ecsankey from '@/components/echarts/ec_sankey'
import ecBarNew from '@/components/echarts/ec_bar_new'
import echartsLiquidfill from '@/components/echarts/echartsLiquidfill'
import ecgauge from '@/components/echarts/ec_gauge'
import dayjs from 'dayjs'
export default {
  name: 'zhaoxiongfei',
  data() {
    return {
      tree_data: [],
      a: 0,
      date_radio: '2',
      Today: '',
      Yesterday: '',
      Amonth: '',
      ecdata: {
        bgData: [
          [{
            name: '尖',
            xAxis: '07时'
          }, {
            xAxis: '11时'
          }],
          [{
            name: '峰',
            xAxis: '11时'
          }, {
            xAxis: '16时'
          }],
          [{
            name: '平',
            xAxis: '16时'
          }, {
            xAxis: '19时'
          }],
          [{
            name: '谷',
            xAxis: '19时'
          }, {
            xAxis: '0时'
          }]
        ],
        name: [
          "蒸汽HF05",
          "蒸汽HF09",
          "蒸汽HF78",
          "蒸汽HF34",
          "蒸汽HF12"
        ],
        time: [
          "07时",
          "08时",
          "09时",
          "10时",
          "11时",
          "12时",
          "13时",
          "14时",
          "15时",
          "16时",
          "17时",
          "18时",
          "19时",
          "20时",
          "21时",
          "22时",
          "23时",
          "00时",
          "01时",
          "02时",
          "03时",
          "04时",
          "05时",
          "06时"
        ],
        value: [

          [
            3.36,
            2.98,
            3.08,
            3.29,
            3.4,
            2.39,
            1.2,
            0.27,
            0,
            0.01,
            0,
            0,
            0,
            0,
            0,
            0.13,
            1.22,
            1.58,
            2.27,
            2.89,
            3.13,
            3.09,
            2.77,
            2.84
          ],

          [
            2.7,
            2.53,
            1.45,
            1.45,
            1.21,
            1.29,
            1.47,
            2.15,
            2.43,
            2.56,
            2.56,
            2.8,
            2.7,
            2.76,
            2.69,
            2.81,
            2.7,
            2.79,
            2.82,
            2.82,
            2.81,
            2.71,
            2.75,
            2.8
          ]
        ]
      }
    }
  },
  created() {
    this.Today = dayjs().subtract(0, 'day').format('YYYY-MM-DD')
    this.Yesterday = dayjs().subtract(1, 'day').format('YYYY-MM-DD')
    this.Amonth = dayjs().subtract(1, 'month').format('YYYY-MM-DD')


    this.$axios
      .get(this.Eelec + "/energyBoardWeb/getCompanyTree",
        {
          params: {
            custId: 4,
            date: this.Today
          }
        }
      )
      .then(res => {
        this.tree_data = []
        this.tree_data.push(res.data.data)

      }).catch((err) => {
      })


  },
  methods: {
    toggle() {
      this.$refs['fullscreen'].toggle() // recommended
    }

  },
  mounted() { },
  components: {
    ecsankey,
    ecBarNew,
    echartsLiquidfill,
    ecgauge,
    ectree
  },
}

</script>

<style lang='' scoped>
</style>